<?php
declare(strict_types=1);

use Phinx\Migration\AbstractMigration;

final class AddIndexProjectIdRoleCodeInProjectMemberTable extends AbstractMigration
{
    public function up()
    {
        $this->table('project_member')->addIndex(['project_id', 'role_code'], ['name' => 'idx_project_id_role_code', 'type' => 'normal'])->save();
    }

    public function down()
    {
        $this->table('project_member')->removeIndex('idx_project_id_role_code')->save();
    }
}
